<template>
   <div class="spage">
     <myhead title="修改密码" :back="true"></myhead>
       <van-form @submit="onSubmit">
      <van-field
        v-model="form.phone"
        name="phone"
        label="手机号码"
        placeholder="手机号码"
        :rules="[{ required: true, message: '请填写手机号码' }]"
      />
      <van-field
        v-model="form.oldpassword"
        type="password"
        name="oldpassword"
        label="旧密码"
        placeholder="旧密码"
        :rules="[{ required: true, message: '请填写旧密码' }]"
      />
       <van-field
        v-model="form.password"
        type="password"
        name="password"
        label="新密码"
        placeholder="新密码"
        :rules="[{ required: true, message: '请填写新密码' }]"
      />
      <div  style="margin: 0.5rem;">
          <p class="links">
              <router-link class="aitem " :to="{name:'register'}">没有账号,立即注册</router-link>
              <router-link class="aitem forget"  :to="{name:'login'}">登录</router-link>
          </p>
      </div>
      <div style="margin: 0.5rem;">
        <van-button round block type="primary" native-type="submit">确认</van-button>
      </div>
    </van-form>
   </div>
</template>

<script>
export default {
  data(){
    return {
      form:{

      }
    }
  },
  methods:{
    onSubmit(){

    }
  }
}
</script> 

<style lang="scss" scoped>
.links{
  display: flex;
  justify-content: space-between;
}
.aitem{
  text-decoration: none;
  color:brown;
}
.forget{
  color:yellowgreen;
  text-align: right;
}
</style>

  